package demo1_i;

public class Animial {
    public String name;
    public int age;

    public Animial(String name, int age) {
        this.name = name;
        this.age = age;
        System.out.println("构造方法执行Animal");
    }

    static{
        System.out.println("静态代码块执行Animal");
    }
    {
        System.out.println("实例代码块执行Animal");
    }
    public void eat(){
        System.out.println(this.name + "吃饭");
    }
}
